import numpy.random
import scipy.special
import matplotlib

matplotlib.use('TkAgg')  # 设置后端
import matplotlib.pyplot as plt
import numpy

# %matplotlib inline

data_file = open("mnist_train_100.csv", 'r')
data_list = data_file.readlines()
# print(data_list)
data_file.close()

all_values = data_list[2].strip().split(",")

image_array = numpy.asarray(all_values[1:]).reshape((28, 28)).astype(numpy.float32)
print(image_array)

plt.imshow(image_array, cmap='Greys', interpolation="None")
plt.show()
